<?php

include_once("../functions.php");
session_start();
check_valid_user();

if (isset($_FILES["uploadvlinkfile"]["name"]))
{
	if (false == ($xml = file_get_contents($_FILES["uploadvlinkfile"]["name"])))
	{
		echo "Failed to read file.\n";
	}
	topol_recover_script_parse ($xml, $_SESSION["loadname"]);
}

?>

<html>
<head>
<meta http-equiv=content-type content="text/html; charset=utf-8">
<title>Up load scrip to recover topological graph</title>
<script type="text/javascript" src="./js/functions.js"></script>
</head>

<body>

<h1>Up load file:</h1>
<form name="uploadform" action="<?php echo $_SERVER["PHP_SELF"];?>" method="post" enctype="multipart/form-data">
<div>
	<input type="hidden" name="MAX_FILE_SIZE" value="20000"/>
	<label for="uploadvlinkfile">Upload a vlink file</label><input type="file" name="uploadvlinkfile" id="uploadvlinkfile"/>
	<input type="submit" value="upload" onclick="checkfile();"/>
</div>
</form>
<div style="position:absolute;left:30;top:320;" id="showErrorInfo"></div>
<div><a href="../viewtopol.html">Back to topological graph</a></div>

</body>
</html>

